package com.room.service;

import com.room.mapper.DormmanMapper;
import com.room.pojo.Dormman;
import com.room.pojo.Student;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @创建人 lin
 * @创建时间 2019/10/14
 * @描述
 */
@Service
public class DormmanService {
    @Autowired
    DormmanMapper dormmanMapper;

    //根据分页获取学生数据
    public List<Dormman> getDormmanByPage(Integer page, Integer size){
        int start  = (page-1)* size;
        return dormmanMapper.getDormmanByPage(start,size);
    }

    public long getTotal(){
        return dormmanMapper.getTotal();
    }
}
